﻿using DocumentFormat.OpenXml.Lite.DrawingML.Base;
using DocumentFormat.OpenXml.Lite.DrawingML.Geometry;
using DocumentFormat.OpenXml.Lite.DrawingML.Types;
using DocumentFormat.OpenXml.Lite.DrawingML.Visual;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.DrawingML.Text.Properties
{
    [XmlRoot("bodyPr", Namespace = Constants.Main)]
    public class BodyProperties : XmlSerializable
    {
        #region Attributes

        [Optional]
        [XmlAttribute("rot", Form = XmlSchemaForm.Qualified)]
        public Nullable<int> Rotation { get; set; }

        [Optional]
        [XmlAttribute("spcFirstLastPara", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> ParagraphSpacing { get; set; }

        [Optional]
        [XmlAttribute("vertOverflow", Form = XmlSchemaForm.Qualified)]
        public Nullable<ST_TextVertOverflowType> TextVerticalOverflow { get; set; }

        [Optional]
        [XmlAttribute("horzOverflow", Form = XmlSchemaForm.Qualified)]
        public Nullable<ST_TextHorzOverflowType> TextHorizontalOverflow { get; set; }

        [Optional]
        [XmlAttribute("vert", Form = XmlSchemaForm.Qualified)]
        public Nullable<ST_TextVerticalType> VerticalText { get; set; }

        [Optional]
        [XmlAttribute("wrap", Form = XmlSchemaForm.Qualified)]
        public Nullable<ST_TextWrappingType> TextWrappingType { get; set; }

        [Optional]
        [XmlAttribute("lIns", Form = XmlSchemaForm.Qualified)]
        public Nullable<int> LeftInset { get; set; }

        [Optional]
        [XmlAttribute("tIns", Form = XmlSchemaForm.Qualified)]
        public Nullable<int> TopInset { get; set; }

        [Optional]
        [XmlAttribute("rIns", Form = XmlSchemaForm.Qualified)]
        public Nullable<int> RightInset { get; set; }

        [Optional]
        [XmlAttribute("bIns", Form = XmlSchemaForm.Qualified)]
        public Nullable<int> BottomInset { get; set; }

        [Optional]
        [XmlAttribute("numCol", Form = XmlSchemaForm.Qualified)]
        public Nullable<int> NumberOfColumns { get; set; }

        [Optional]
        [XmlAttribute("spcCol", Form = XmlSchemaForm.Qualified)]
        public Nullable<int> SpaceBetweenColumns { get; set; }

        [Optional]
        [XmlAttribute("rtlCol", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> ColumnsRightToLeft { get; set; }

        [Optional]
        [XmlAttribute("fromWordArt", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> FromWordArt { get; set; }

        [Optional]
        [XmlAttribute("anchor", Form = XmlSchemaForm.Qualified)]
        public Nullable<ST_TextAnchoringType> Anchor { get; set; }

        [Optional]
        [XmlAttribute("anchorCtr", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> AnchorCenter { get; set; }

        [Optional]
        [XmlAttribute("forceAA", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> ForceAntiAlias { get; set; }

        [Optional]
        [XmlAttribute("upright", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> TextUpright { get; set; }

        [Optional]
        [XmlAttribute("compatLnSpc", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> CompatibleLineSpacing { get; set; }

        #endregion

        #region Elements

        [Optional]
        [XmlElement("prstTxWarp", Namespace = Constants.Main)]
        public PresetTextShape PresetTextShape { get; set; }

        [Optional]
        [XmlElement("", Namespace = Constants.Main)]
        public IAutoFit AutoFit { get; set; }

        [Optional]
        [XmlElement("scene3d", Namespace = Constants.Main)]
        public Scene3dProperties Scene3dProperties { get; set; }

        [Optional]
        [XmlElement("", Namespace = Constants.Main)]
        public IBody3dProperty Property3d { get; set; }

        [Optional]
        [XmlElement("extLst", Namespace = Constants.Main)]
        public ExtensionList ExtensionList { get; set;   }

        #endregion

        public BodyProperties() { }
    }
}
